/*
 * This file is generated by jOOQ.
 */
package ru.ra_tech.garden_manager.database.schema.tables.records;


import java.time.OffsetDateTime;

import org.jooq.Field;
import org.jooq.Record1;
import org.jooq.Record5;
import org.jooq.Row5;
import org.jooq.impl.UpdatableRecordImpl;

import ru.ra_tech.garden_manager.database.schema.tables.GardensParticipants;


/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class GardensParticipantsRecord extends UpdatableRecordImpl<GardensParticipantsRecord> implements Record5<Long, Long, Long, Integer, OffsetDateTime> {

    private static final long serialVersionUID = 1L;

    /**
     * Setter for <code>public.gardens_participants.id</code>.
     */
    public void setId(Long value) {
        set(0, value);
    }

    /**
     * Getter for <code>public.gardens_participants.id</code>.
     */
    public Long getId() {
        return (Long) get(0);
    }

    /**
     * Setter for <code>public.gardens_participants.garden</code>.
     */
    public void setGarden(Long value) {
        set(1, value);
    }

    /**
     * Getter for <code>public.gardens_participants.garden</code>.
     */
    public Long getGarden() {
        return (Long) get(1);
    }

    /**
     * Setter for <code>public.gardens_participants.participant</code>.
     */
    public void setParticipant(Long value) {
        set(2, value);
    }

    /**
     * Getter for <code>public.gardens_participants.participant</code>.
     */
    public Long getParticipant() {
        return (Long) get(2);
    }

    /**
     * Setter for <code>public.gardens_participants.role</code>.
     */
    public void setRole(Integer value) {
        set(3, value);
    }

    /**
     * Getter for <code>public.gardens_participants.role</code>.
     */
    public Integer getRole() {
        return (Integer) get(3);
    }

    /**
     * Setter for <code>public.gardens_participants.assignedAt</code>.
     */
    public void setAssignedat(OffsetDateTime value) {
        set(4, value);
    }

    /**
     * Getter for <code>public.gardens_participants.assignedAt</code>.
     */
    public OffsetDateTime getAssignedat() {
        return (OffsetDateTime) get(4);
    }

    // -------------------------------------------------------------------------
    // Primary key information
    // -------------------------------------------------------------------------

    @Override
    public Record1<Long> key() {
        return (Record1) super.key();
    }

    // -------------------------------------------------------------------------
    // Record5 type implementation
    // -------------------------------------------------------------------------

    @Override
    public Row5<Long, Long, Long, Integer, OffsetDateTime> fieldsRow() {
        return (Row5) super.fieldsRow();
    }

    @Override
    public Row5<Long, Long, Long, Integer, OffsetDateTime> valuesRow() {
        return (Row5) super.valuesRow();
    }

    @Override
    public Field<Long> field1() {
        return GardensParticipants.GARDENS_PARTICIPANTS.ID;
    }

    @Override
    public Field<Long> field2() {
        return GardensParticipants.GARDENS_PARTICIPANTS.GARDEN;
    }

    @Override
    public Field<Long> field3() {
        return GardensParticipants.GARDENS_PARTICIPANTS.PARTICIPANT;
    }

    @Override
    public Field<Integer> field4() {
        return GardensParticipants.GARDENS_PARTICIPANTS.ROLE;
    }

    @Override
    public Field<OffsetDateTime> field5() {
        return GardensParticipants.GARDENS_PARTICIPANTS.ASSIGNEDAT;
    }

    @Override
    public Long component1() {
        return getId();
    }

    @Override
    public Long component2() {
        return getGarden();
    }

    @Override
    public Long component3() {
        return getParticipant();
    }

    @Override
    public Integer component4() {
        return getRole();
    }

    @Override
    public OffsetDateTime component5() {
        return getAssignedat();
    }

    @Override
    public Long value1() {
        return getId();
    }

    @Override
    public Long value2() {
        return getGarden();
    }

    @Override
    public Long value3() {
        return getParticipant();
    }

    @Override
    public Integer value4() {
        return getRole();
    }

    @Override
    public OffsetDateTime value5() {
        return getAssignedat();
    }

    @Override
    public GardensParticipantsRecord value1(Long value) {
        setId(value);
        return this;
    }

    @Override
    public GardensParticipantsRecord value2(Long value) {
        setGarden(value);
        return this;
    }

    @Override
    public GardensParticipantsRecord value3(Long value) {
        setParticipant(value);
        return this;
    }

    @Override
    public GardensParticipantsRecord value4(Integer value) {
        setRole(value);
        return this;
    }

    @Override
    public GardensParticipantsRecord value5(OffsetDateTime value) {
        setAssignedat(value);
        return this;
    }

    @Override
    public GardensParticipantsRecord values(Long value1, Long value2, Long value3, Integer value4, OffsetDateTime value5) {
        value1(value1);
        value2(value2);
        value3(value3);
        value4(value4);
        value5(value5);
        return this;
    }

    // -------------------------------------------------------------------------
    // Constructors
    // -------------------------------------------------------------------------

    /**
     * Create a detached GardensParticipantsRecord
     */
    public GardensParticipantsRecord() {
        super(GardensParticipants.GARDENS_PARTICIPANTS);
    }

    /**
     * Create a detached, initialised GardensParticipantsRecord
     */
    public GardensParticipantsRecord(Long id, Long garden, Long participant, Integer role, OffsetDateTime assignedat) {
        super(GardensParticipants.GARDENS_PARTICIPANTS);

        setId(id);
        setGarden(garden);
        setParticipant(participant);
        setRole(role);
        setAssignedat(assignedat);
        resetChangedOnNotNull();
    }
}
